Skip to content

[ML-47076] Add frequency_quantity in get_validation_horizon to support custom frequency #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

Lanz-db
Copy link

@Lanz-db Lanz-db commented Feb 5, 2025

This PR is part of the project, Support custom frequency, see jira ticket for more details.
This PR adds a new input argument, frequency_quantity, to function get_validation_horizon. It changes the logic to calculate horizon_dateoffset and unit_dateoffset by multiplying with the given frequency_quantity.

For testing, I added several test cases under runtime/tests/automl_runtime/forecast/utils_test.py. Since we only add extra supports of 5 min, 10 min, 15 min and 30 min for now, I only added those test cases.
To run the test,

PYTHONPATH=~/automl/runtime/ pytest tests/automl_runtime/forecast/utils_test.py

Copy link
Contributor

@wenfeiy-db wenfeiy-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left some minor comment around readability.

@Lanz-db Lanz-db merged commit d2d2cdf into branch-0.2.20.5 Feb 5, 2025
5 checks passed
@Lanz-db Lanz-db deleted the lan-zhang_data/freq_lib branch February 5, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants